package org.deltaset.secured.user;

import java.io.Serializable;

/**
 * immutable
 * @author dmakariev
 */
public class UserContext implements Serializable {

    public static UserContextBuilder from(UserContext uc) {
        return UserContextBuilder.from(uc);
    }

    public static UserContext newUserContext() {
        return UserContextBuilder.newUserContext();
    }

    UserContext(String dateFormat, String showPager, String fieldsetPosition, String fieldsetWidth, String viewType, String locale, String themeName, String layoutName, String uiStyle) {
        this.dateFormat = dateFormat;
        this.showPager = showPager;
        this.fieldsetPosition = fieldsetPosition;
        this.fieldsetWidth = fieldsetWidth;
        this.locale = locale;
        this.themeName = themeName;
        this.layoutName = layoutName;
        this.viewType = viewType;
        this.uiStyle = uiStyle;
    }
    //deltasetConfig properties
    private final String dateFormat;
    private final String showPager;
    private final String fieldsetPosition;
    private final String fieldsetWidth;
    private final String viewType;
    //application specific
    private final String locale;
    private final String themeName;
    private final String layoutName;
    private final String uiStyle;

    public String getUiStyle() {
        return uiStyle;
    }

    /**
     * @return the dateFormat
     */
    public String getDateFormat() {
        return dateFormat;
    }

    /**
     * @return the showPager
     */
    public String getShowPager() {
        return showPager;
    }

    /**
     * @return the fieldsetPosition
     */
    public String getFieldsetPosition() {
        return fieldsetPosition;
    }

    /**
     * @return the fieldsetWidth
     */
    public String getFieldsetWidth() {
        return fieldsetWidth;
    }

    /**
     * @return the locale
     */
    public String getLocale() {
        return locale;
    }

    /**
     * @return the themeName
     */
    public String getThemeName() {
        return themeName;
    }

    /**
     * @return the layoutName
     */
    public String getLayoutName() {
        return layoutName;
    }

    /**
     * @return the viewType
     */
    public String getViewType() {
        return viewType;
    }
}
